{template Public:Page:header}

<form method="post" id="Forgotpassword">
<div class="container">
     <div class="row">
         
               <div class="widget radius-bordered">
                    <div class="widget-header"> <span class="widget-caption"><i class="glyphicon glyphicon-user"></i> 找回密码</span> </div>
                    <div class="widget-body">
                         <div class="row">
                              <div class="col-lg-12">
                             			<div class="col-lg-12">
                               	 		<div class="tabbable">
                                            <ul id="myTab11" class="nav nav-tabs tabs-flat">
                                                <li class="active">
                                                    <a href="#useemail" data-toggle="tab" onclick="$('#ToolType').val(1);">
                                                        使用邮箱找回
                                                    </a>
                                                </li>
                                                <li>
                                                    <a href="#usemobile" data-toggle="tab" onclick="$('#ToolType').val(2);">
                                                        使用手机找回
                                                    </a>
                                                </li>
                                            </ul>
                                            <div class="tab-content tabs-flat">
                                                <div class="tab-pane in active" id="useemail">
                                               		<div class="col-lg-5">
                                                    <div class="form-group has-feedback">
                                                    	<label>电子邮箱：</label> <input name="email" type="text" class="form-control" autocomplete="off" value=""/>
                                                    </div>
                                                    </div>
                                                </div>

                                                <div class="tab-pane" id="usemobile">
                                               		<div class="col-lg-5">
                                                    <div class="form-group has-feedback">
                                                    <label>手机号码：</label> <input name="mobile" type="text" class="form-control" autocomplete="off" value=""/>
                                                     </div>
                                                     </div>
                                                </div>
                                            </div>
                                        </div>
                                      </div> 
                                    
                                        <div class="col-lg-12" style="padding-left:38px; padding-top:10px; padding-bottom:20px;">{hook VerifyCode}</div>
                                    
                                       <div class="col-lg-11" style="padding-left:42px;">
                                         <div class="form-group">
                                          <input id="ToolType" type="hidden" value="1" name="tooltype"/>
                                          <input  type="hidden" value="json" name="datatype"/>
                                          <button class="btn btn-primary" type="submit" onclick="return Forgotpassword();">提 交</button>
                                        </div>
                                      </div>
                                       
                              </div>
                         </div>
                    </div>
              
          </div>
     </div>
</div>
</form>

<script>

 
function Forgotpassword() {
				
	 if($('#ToolType').val()==1){
		 if($('input[name="email"]').val().length<6){
			 alert("请输入正确邮箱!");
			 return false; 
		 }
	 }else{
		 if (isNaN($('input[name="mobile"]').val()) || $('input[name="mobile"]').val().length<11){
			 alert("请输入正确手机号码!");
			 return false; 
		 }
	 }
	  bootbox.hideAll();

	  $.post('/get/forgotpassword/index',$("#Forgotpassword").serialize(), function(json) {
		
			$('.bootbox').PhpappProgress({json:json});

			return true;
		
	  }, 'json');


	 bootbox.dialog({
		 message: '<div class="progress progress-striped active"><div style="width: 1%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="20" role="progressbar" class="progress-bar progress-bar-info"><span>0%</span></div></div>',
		 title: '<i class="icon fa fa-retweet"></i> 提交中',
		 closeButton: false
	 }).PhpappProgress({time:1000});
 
	  return false; 
		 
}
	

	   
</script>


{template Public:Page:footer}